package com.bole.feign;


import com.bole.dto.content.TbContentDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "BOLECAR-BACKSTAGE-SERVICE")
public interface ContentFeign  {
    @GetMapping("/content/getContentInfo")
    List<TbContentDto> getContentInfo();

    @PostMapping("/content/addContentInfo")
    void addContentInfo(@RequestBody TbContentDto content);

    @PostMapping("/content/toUpdate")
    TbContentDto toUpdate(@RequestParam("id") Long id);


    @PostMapping("/content/updateById")
    void updateById(@RequestBody TbContentDto content);


    @PostMapping("/content/deleteBatch")
    void deleteBatch(@RequestParam("idss") List<Long> idss);

    @GetMapping("/content/getContentInfoByCate/{id}")
   List<TbContentDto> getContentInfoByCate(@PathVariable("id") Long id);


    @GetMapping("/content/getContentInfoByTitle")
    List<TbContentDto> getContentInfoByTitle(@RequestParam("title") String title);

}
